//
//  HomeCollectionViewCell.m
//  01-WaiQingTong
//
//  Created by 李晓东 on 17/9/21.
//  Copyright © 2017年 PeanutXu. All rights reserved.
//

#import "HomeCollectionViewCell.h"

@interface HomeCollectionViewCell ()
//@property (nonatomic, strong) UIImageView *imageView;
@property (nonatomic, strong) UIButton *button;
@end

@implementation HomeCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    self.button = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.button setFrame:CGRectMake(0, 0, 80, 80)];
    
//    NSString *imgName = [NSString stringWithFormat:@"%d", 1];
//    [self.button setImage:[UIImage imageNamed:imgName] forState:UIControlStateNormal];
//    [self.button setTitle:@"fuck" forState:UIControlStateNormal];
    
//    self.button.imageEdgeInsets = UIEdgeInsetsMake(5, 15, 55, 15);
//    [self.button setTitleEdgeInsets:UIEdgeInsetsMake(50, 10, 20, 30)];
//    [self.button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.contentView addSubview:self.button];
    [self.button addTarget:self action:@selector(jumpToDoSomething) forControlEvents:UIControlEventTouchUpInside];
    return self;
}

- (void)setIcon:(NSInteger)item{
    NSString *imgName = [NSString stringWithFormat:@"%ld", item + 1];
    [self.button setImage:[UIImage imageNamed:imgName] forState:UIControlStateNormal];
    
    
}

- (void)jumpToDoSomething {
    
}
@end
